<template>
  <div class="find">
			<myswiper :banners="banner"></myswiper>
			<indexnav></indexnav>
			<playlist :playlists="playlist" ></playlist>
			<newablum-music></newablum-music>
			<newredio :newredio = "newRadio"></newredio>
			<personalized :sw="personalizeds"></personalized>
			<musicvidio :mv="getmv"></musicvidio>
  </div>
</template>

<script>import myswiper from '@/components/myswiper.vue'
import indexnav from './children/indexnav.vue'
import playlist from './children/recommendPlaylist.vue'
import newablumMusic from './children/newablumMusic.vue'
import newredio from './children/newRedio.vue'
import personalized from './children/personalized.vue'
import musicvidio from './children/musicvidio.vue'
export default {
	name: "find",
	components: {
		myswiper,
		indexnav,
		playlist,
		newablumMusic,
		newredio,
		personalized,
		musicvidio
	},
	props: {},
	data() {
		return {
			banner: [],
			playlist: [],
			album: [],
			newRadio: [],
			personalizeds: [],
			getmv: []
		};
	},
	watch: {},
	computed: {},

	methods: {

		getBanner() {
			this.$http.get("/banner", {
				params: {
					type: 2
				}
			}).then(res => {
				console.log(res)
				this.banner = res.data.banners
			})
		},
		getRelated() {
			this.$http.get("/personalized", {
				params: {
					limit: 6
				}
			}).then(res => {
				console.log(res)
				this.playlist = res.data.result;

			})
		},

		//	getLogin(){
		//		this.$http.get("/login/cellphone",{
		//			params:{
		//				phone:15625054750,
		//				password:"0320.qtt"
		//			}
		//		}).then(res=>{
		//			console.log(res)
		//			
		//		})
		//	},
		getPersonalize() {
			this.$http.get("/dj/hot").then(res => {
				console.log(res)
				this.newRadio = res.data.djRadios;
			})
		},

		getMv() {
			this.$http.get("/personalized/mv").then(res => {
				console.log(res)
				this.getmv = res.data.result
			})
		},

		getPersonalized() {
			this.$http.get("/personalized/privatecontent").then(res => {
				console.log(res)
				this.personalizeds = res.data.result
			})
		}

	},
	created() {
		this.getBanner(); //banenr
		this.getRelated(); //推荐歌单
		this.getPersonalize(); //推荐电台
		this.getPersonalized(); //独家放送
		this.getMv(); //精选mv
	},
	mounted() {}
};</script>
<style lang="scss" scoped>@import "~@/assets/css/common.scss";
.find {
	background-color: #eee;
}</style>